SeeAllData=true
should not be used because it gives your tests access to all data in your organization. Activating this option makes
your test dependent on existing data and more difficult to maintain. Tests should create their own data.
This rule raises an issue when it sees @isTest(SeeAllData=true)
.
Noncompliant code example
@isTest(SeeAllData=true) // Noncompliant
public class MyTestClass {
@isTest(SeeAllData=true) // Noncompliant
static void myTestMethod() {
// Can access all data in the organization.
}
}